const Creator = require('./Creator');

const path = require('path');
// 检查文件夹名称是否重复 => 拉取模板 => 更新 package.json 信息 =>  安装依赖

module.exports = async (projectName: string) => {
  console.log('2023-03-16 19:10:39', 11);
  // 命令执行时的目录
  const cwd = process.cwd();
  // 目录拼接项目名
  const targetDir = path.resolve(cwd, projectName || '.');
  await new Creator(projectName, targetDir);
  // console.log('2023-03-14 20:01:12', creator);
};
